/////////////////////////////////////////////////////////////////////////
//
// Amuse Engine SDK - core/threads
// Copyright (c) 2014.  All Rights Reserved
//
// File:		AEThreadContext.h
// Author:		Gianluca Belardelli
// Date:		12/03/2014
//
/////////////////////////////////////////////////////////////////////////
#ifndef _AETHREADCONTEXT_H_
#define _AETHREADCONTEXT_H_

class AEThreadPool;

class AE_COREDLLIMPEXP AEThreadContext
{
// Members
public:
	enum AEContextStatus
	{
		ExecCallback,
		ExecShutdown
	};

	typedef void ( *AEThreadCallback )( void* lpThreadData );

    AEThreadPool		*m_lpThreadPool;
    AEEvent				*m_lpStatusEvent;
	AEEvent				*m_lpSleepEvent;
	AEEvent				*m_lpWakeEvent;
    AESemaphore			*m_lpWorkQueueSemaphore;	
    AEContextStatus		m_csStatus;
    AEThreadCallback	m_lpfnThreadCallback;
    void				*m_lpThreadData;
    AEUINT32			*m_lpCallbackCountdown;
};

#endif // _AETHREADCONTEXT_H_
